package com.volunteer.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 报名实体类
 */
@Data
@TableName("t_registration")
public class Registration implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 报名ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 活动ID
     */
    @TableField("activity_id")
    private Long activityId;


    @TableField(exist = false)
    private String activityName;

    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 用户名
     */
    @TableField(exist = false)
    private String userName;


    /**
     * 报名状态（0-待审核 1-已通过 2-已拒绝 3-已取消）
     */
    @TableField("status")
    private Integer status;

    /**
     * 报名时间
     */
    @TableField("register_time")
    private LocalDateTime registerTime;

    /**
     * 审核时间
     */
    @TableField("audit_time")
    private LocalDateTime auditTime;

    /**
     * 审核备注
     */
    @TableField("audit_remark")
    private String auditRemark;

    /**
     * 签到状态（0-未签到 1-已签到）
     */
    @TableField("check_in_status")
    private Integer checkInStatus;

    /**
     * 签到时间
     */
    @TableField("check_in_time")
    private LocalDateTime checkInTime;

    /**
     * 是否已评价（0-否 1-是）
     */
    @TableField("is_evaluated")
    private Integer isEvaluated;
}
